package com.xiaoyu.shenyou.shenyouv1.common.enums;


import com.xiaoyu.shenyou.shenyouv1.common.exception.BusinessException;
import lombok.Getter;

@Getter
public enum ApplyStatusEnum {
    WAITING("等待处理中"),
    PROCESSED("已处理");
    private final String status;

    ApplyStatusEnum(String status) {
        this.status = status;
    }

    public static ApplyStatusEnum parse(String status) {
        for (ApplyStatusEnum value : ApplyStatusEnum.values()) {
            if (value.status.equals(status)) {
                return value;
            }
        }
        throw new BusinessException("状态不存在");
    }
}
